package com.yitianyigexiangfa.designpattern.facade.hometheater.subsystem;

/**
 * 〔电视机或收音机上的〕调谐器
 *
 * @author Bill Lau
 * @date 2018-01-18
 */
public class Tuner {

    private Amplifier amplifier = new Amplifier();

    public void on() {
        System.out.println("Tuner on");
    }

    public void off() {
        System.out.println("Tuner off");
    }

    /**
     * 设置调幅
     */
    public void setAm(float am) {
        System.out.println("Tuner set am:" + am);
    }

    /**
     * 设置调频
     */
    public void setFm(float fm) {
        System.out.println("Tuner set fm: " + fm);
    }

    public void setFrequency(int frequency) {
        System.out.println("Tuner set frequency:" + frequency);
    }

    @Override
    public String toString() {
        return "Tuner{" +
               "amplifier=" + amplifier +
               '}';
    }
}
